import QtQuick 2.0
import QtQuick.Controls 1.4

import "../../../commonUI"
import "../../../basic"

// 消息与隐私
Item {
    anchors.left: parent.left
    anchors.right: parent.right
    height: 270

    Label {
        id: messagePrivacy
        text: qsTr("消息与隐私")
        font.pixelSize: 22
        font.bold: true
        font.family: BasicConfig.heiTiFont
        anchors.left: parent.left
        color: "white"
    }

    Column {
        id: specialSetting
        anchors.left: messagePrivacy.right
        anchors.leftMargin: 80
        spacing: 30

        Row {
            spacing: 30
            Label {
                text: qsTr("私信")
                font.pixelSize: 18
                font.bold: true
                font.family: BasicConfig.heiTiFont
                color: "white"
            }
            // 定义RadioButton组
            ExclusiveGroup {
                id: letterExclusiveGroup
            }
            CustomRadioButton {
                isSelect: true
                contentText: qsTr("所有人")
                exclusiveGroup: letterExclusiveGroup
            }
            CustomRadioButton {
                contentText: qsTr("我关注的人")
                exclusiveGroup: letterExclusiveGroup
            }
        }
        Row {
            spacing: 30
            Label {
                text: qsTr("我的听歌排行")
                font.pixelSize: 18
                font.bold: true
                font.family: BasicConfig.heiTiFont
                color: "white"
            }
            // 定义RadioButton组
            ExclusiveGroup {
                id: songExclusiveGroup
            }
            CustomRadioButton {
                isSelect: true
                contentText: qsTr("所有人可见")
                exclusiveGroup: songExclusiveGroup
            }
            CustomRadioButton {
                contentText: qsTr("我关注的人可见")
                exclusiveGroup: songExclusiveGroup
            }
            CustomRadioButton {
                contentText: qsTr("仅自己可见")
                exclusiveGroup: songExclusiveGroup
            }
        }
        Row {
            spacing: 30
            Label {
                text: qsTr("个性化服务")
                font.pixelSize: 18
                font.bold: true
                font.family: BasicConfig.heiTiFont
                color: "white"
            }
            // 定义RadioButton组
            ExclusiveGroup {
                id: serviceExclusiveGroup
            }
            CustomRadioButton {
                contentText: qsTr("开启")
                exclusiveGroup: serviceExclusiveGroup
            }
            CustomRadioButton {
                contentText: qsTr("关闭（关闭后，即不会使用你的个性信息提供个性化服务为）")
                exclusiveGroup: serviceExclusiveGroup
            }
        }
        Row {
            spacing: 50
            Label {
                text: qsTr("通知")
                font.pixelSize: 18
                font.bold: true
                font.family: BasicConfig.heiTiFont
                color: "white"
            }
            CustomCheckBox {
                width: 100
                height: 30
                textColor: "white"
                text: qsTr("歌单被收藏")
                isSelected: true
            }
            CustomCheckBox {
                width: 100
                height: 30
                textColor: "white"
                text: qsTr("收到赞")
                isSelected: true
            }
            CustomCheckBox {
                width: 100
                height: 30
                textColor: "white"
                text: qsTr("新粉丝")
                isSelected: true
            }
        }
        Row {
            spacing: 50
            Label {
                text: qsTr("黑名单设置")
                font.pixelSize: 18
                font.bold: true
                font.family: BasicConfig.heiTiFont
                color: "white"
            }
            Label {
                text: qsTr("我的黑名单")
                font.pixelSize: 18
                font.family: BasicConfig.heiTiFont
                color: "white"
            }
            Rectangle {
                width: 50
                height: 20
                border.width: 1
                border.color: "#E8E8E8"
                radius: 20
                Label {
                    text: qsTr("查看")
                    font.pixelSize: 12
                    font.family: BasicConfig.commFont
                    anchors.centerIn: parent
                    color: "white"
                }
                color: BasicConfig.fieldBgBordColor

                MouseArea {
                    anchors.fill: parent
                    hoverEnabled: true

                    // 鼠标穿透，按下事件不接收，传递给父控件
                    propagateComposedEvents: true
                    onPressed: mouse.accepted = false

                    onEntered: {
                        parent.border.color = BasicConfig.fieldBgColor
                        parent.color = "#303037"
                        cursorShape = Qt.PointingHandCursor
                    }
                    onExited: {
                        parent.border.color = "#E8E8E8"
                        parent.color = BasicConfig.fieldBgBordColor
                        cursorShape = Qt.ArrowCursor
                    }
                }
            }
        }
    }
    CustomPliteLine { }
}
